package com.kgc.smbms.service.impl;

import com.kgc.smbms.entity.User;
import com.kgc.smbms.mapper.UserMapper;
import com.kgc.smbms.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;
    @Override
    /**
     * 根据条件查找对应用户
     */
    public List<User> getUserByCondition(String userName, Integer userRole) {
        User user = new User();
        user.setUserName(userName);
        user.setUserRole(userRole);
        List<User> userList = userMapper.selectByUserNameAndUserRole(user);
        return userList;
    }

    @Override
    public User login(String loginparam, String passWord) {
        return null;
    }

    @Override
    public User getUserByid(int id) {
        return null;
    }

    @Override
    public boolean check(String type, String param) {
        return false;
    }

    @Override
    public boolean add(User user) {
        return false;
    }

    @Override
    public boolean update(User user) {
        return false;
    }

    @Override
    public boolean delete(int id) {
        return false;
    }

    @Override
    public boolean checkPassWord(Integer id, String oldPass) {
        return false;
    }

    @Override
    public boolean updatePassWord(Integer id, String newPassword) {
        return false;
    }
}
